package la.iok.hzsvn.lewin.movie.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties("app.dfs.huawei")
public class HuaweiServerProperties {
    private String domain = "Vigverse";
    private String obsReaderName = "obs-reader";
    private String obsReaderPassword = "OBSrder";
    private String obsWriterName = "obs-reader-writer";
    private String obsWriterPassword = "OBSRDWTer";
    private String bucketName = "obs-test";
    private String endPoint = "obs.cn-south-1.myhuaweicloud.com";
    private String region = "cn-south-1";

    public String getDomain() {
        return domain;
    }

    public void setDomain(String domain) {
        this.domain = domain;
    }

    public String getObsReaderName() {
        return obsReaderName;
    }

    public void setObsReaderName(String obsReaderName) {
        this.obsReaderName = obsReaderName;
    }

    public String getObsReaderPassword() {
        return obsReaderPassword;
    }

    public void setObsReaderPassword(String obsReaderPassword) {
        this.obsReaderPassword = obsReaderPassword;
    }

    public String getObsWriterName() {
        return obsWriterName;
    }

    public void setObsWriterName(String obsWriterName) {
        this.obsWriterName = obsWriterName;
    }

    public String getObsWriterPassword() {
        return obsWriterPassword;
    }

    public void setObsWriterPassword(String obsWriterPassword) {
        this.obsWriterPassword = obsWriterPassword;
    }

    public String getBucketName() {
        return bucketName;
    }

    public void setBucketName(String bucketName) {
        this.bucketName = bucketName;
    }

    public String getEndPoint() {
        return endPoint;
    }

    public void setEndPoint(String endPoint) {
        this.endPoint = endPoint;
    }

    public String getRegion() {
        return region;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public String name(boolean enableWrite){
        if(enableWrite){
            return obsWriterName;
        }else{
            return obsReaderName;
        }
    }
    public String password(boolean enableWrite){
        if(enableWrite){
            return obsWriterPassword;
        }else{
            return obsReaderPassword;
        }
    }
}
